package com.example.superoa.model.mappers;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.alibaba.fastjson.JSONArray;
import com.example.superoa.model.vo.HrDepartVo;

@Mapper
public interface HrDepartMapper {
	public List<HrDepartVo> departmentAlls(@Param("departPid")Integer departPid);
	public void addDepart(@Param("departName")String departName,
			@Param("departAddress")String departAddress,
			@Param("parentsid")Integer parentsid);
	public void updateDepart(@Param("departName")String departName,
			@Param("departAddress")String departAddress,
			@Param("Depart_id")Integer Depart_id);
	public void updateDeparttwo(@Param("parentsid")Integer parentsid,@Param("Depart_id")Integer Depart_id);
	public JSONArray selectStaffByDepart(@Param("depart_id")Integer depart_id);
	public void deleteDepart(@Param("depart_id")Integer depart_id);
	
	
	public void addPositionDepart(@Param("position_id")Integer postion_id,
			@Param("Depart_id")Integer Depart_id,@Param("rank_id")Integer rank_id);
	public JSONArray selectPositionDepart();
	public JSONArray selectrank();
	public void deletepdr(@Param("position_id")Integer postion_id,
			@Param("Depart_id")Integer Depart_id,@Param("rank_id")Integer rank_id);
	
	public JSONArray selectStaffof(@Param("position_id")Integer postion_id,
			@Param("Depart_id")Integer Depart_id,@Param("rank_id")Integer rank_id);
	
	public JSONArray selectDairuzhi();
	public JSONArray selectDairuzhishpi(@Param("id")Integer id);
	public JSONArray selectAllStaffs();
	public JSONArray selectStaffByDepartname(@Param("Depart_id")Integer Depart_id);
	public void updateRuzhiById(@Param("id")Integer id);
	public JSONArray selectShpiBystaffid(@Param("staff_id")Integer staff_id,@Param("pxapproval_state")String pxapproval_state);
	public JSONArray selectShpiByid(@Param("id")Integer id);
	
	
	public JSONArray selectRuzhiBysfzz(@Param("sfzz")Integer sfzz);
	
	public JSONArray selectShpiAll();
	
	public void updateLizhi(@Param("sfzz")String sfzz,@Param("staff_id")Integer staff_id);
	
	public Integer selectApprovalByApplyid(@Param("apply_id")Integer apply_id);
	
	public JSONArray selectPositive();
	public JSONArray selectPositiveBystaffid(@Param("staff_id")Integer staff_id);
	
	
	public JSONArray daizhuanzheng(@Param("staff_id")Integer staff_id,@Param("pxapproval_state")String pxapproval_state);
	
	public void updatezhuanzhengById(@Param("id")Integer id);
	
	public JSONArray positivestate();
	public JSONArray positivestated(@Param("pxapproval_if")String pxapproval_if);
	
	
	public JSONArray selectdepartureByshpi(@Param("shpiren")Integer shpiren);
	public JSONArray selectdepartureByid(@Param("rank_id")Integer rank_id);
	public JSONArray selectdepartureResult(@Param("shpiren")Integer shpiren);
	public void Recoverpermissions(@Param("staff_id")Integer staff_id);
	
	public JSONArray beforepositiveshpi(@Param("staff_id")Integer staff_id);
	public JSONArray selectStaffxqByid(@Param("staff_id")Integer staff_id);
}
